<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "merchant".
 *
 * @property int $id
 * @property string $mch_id 商户号
 * @property string $mch_name 商户名
 * @property string $mch_key 商户key
 * @property int $status 状态(0：禁用  1：启用  -1：删除)
 * @property int $created_at 创建时间
 */
class Merchant extends Base
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'merchant';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['status', 'created_at'], 'integer'],
            [['mch_id', 'mch_name', 'mch_key'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'mch_id' => 'Mch ID',
            'mch_name' => 'Mch Name',
            'mch_key' => 'Mch Key',
            'status' => 'Status',
            'created_at' => 'Created At',
        ];
    }
}
